package main

import "fmt"

/**
计算成绩
*/
func main() {

	count, avg, sum := getScore(90, 82.5, 73, 64.8)
	fmt.Printf("共有%d门成绩 , 总成绩 %.2f , 平均成绩 %.2f \n", count, sum, avg)

}

func getScore(scores ...float64) (count int, avg float64, sum float64) {

	for _, value := range scores {
		sum += value
		count++
	}
	avg = sum / float64(count)
	return

}
